package com.sjp.demo.mvc.controller;

import com.sjp.demo.mvc.service.HelloService;
import com.sjp.myspring.annotation.JPAutowired;
import com.sjp.myspring.annotation.JPController;
import com.sjp.myspring.annotation.JPRequestMapping;
import com.sjp.myspring.annotation.JPRequestParam;

@JPController
@JPRequestMapping("/demo")
public class DemoController {

    @JPAutowired
    private HelloService helloService;

    @JPRequestMapping("/hello")
    public String hello(@JPRequestParam("name") String name) {
        return helloService.hello(name);
    }
}
